<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>添加支付方式</title>
		<link type="text/css" rel="stylesheet" href="${path }/js/easyui/themes/default/easyui.css">
		<link type="text/css" rel="stylesheet" href="${path }/js/easyui/themes/icon.css">
		<script type="text/javascript" src="${path }/js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="${path }/js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript">
			var path="${path}";
		</script>
		<script type="text/javascript" src="${path }/js/form/jquery.form.js"></script>
		<script type="text/javascript">
		
			$(document).ready(function() { 
					var options = {
						beforeSubmit: checkForm,
						dataType : 'json',
						success:addAppBack
					};
					
				 	$('#addForm').ajaxForm(options); 
				    
				    
			}); 
			
			
			
			function checkForm(){
				//return false;
			}
			function addAppBack(json){
				if(json.result=="Success"){
					alert("保存成功!");
					refleshOpener();
				}
			}
		
			function refleshOpener(){
				ownerDialog.opener.refresh();
				ownerDialog.close();
			}
			
			
		</script>
	</head>
	<body>
		<form action="${path}/admin/payment/save" method="post" id="addForm" name="addForm">
			<div title="支付信息" class="easyui-panel" style="width:500px;height:350px;padding:10px;background:#fafafa;">
				<table >
					<tr>
						<td>
							支付名称:
						</td>
						<td>
							<input type="text" name="payName" size="40" value="${payment.payName }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							支付费用:
						</td>
						<td>
							<input type="text" name="payFee" size="40" value="${payment.payFee }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							请求路径:
						</td>
						<td>
							<input type="text" name="payUrl" size="40" value="${payment.payUrl }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							订单通知返回路径:
						</td>
						<td>
							<input type="text" name="notifyUrl" size="40" value="${payment.notifyUrl }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							支付返回展示路径:
						</td>
						<td>
							<input type="text" name="showUrl" size="40" value="${payment.showUrl }"><font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td>
							描述:
						</td>
						<td>
							<textarea rows="5" cols="30" name="payDesc">${payment.payDesc }</textarea>
						</td>
					</tr>
					<tr>
						<td>
							是否在线支付
						</td>
						<td>
							<input type="radio" name="isOnline" value="1" <c:if test="${payment.isOnline == 1 }">checked</c:if> />是
							<input type="radio" name="isOnline" value="0" <c:if test="${payment.isOnline == 0 }">checked</c:if> />否
						</td>
					</tr>
					<tr>
						<td>
							是否货到付款
						</td>
						<td>
							<input type="radio" name="isCod" value="1" <c:if test="${payment.isCod == 1 }">checked</c:if> />是
							<input type="radio" name="isCod" value="0" <c:if test="${payment.isCod == 0 }">checked</c:if> />否
						</td>
					</tr>
				</table>
			</div>
			
			<div>
				<table>
					<tr>
						<td>
							<input type="hidden" name="payId" value="${payment.payId }">
							<input type="submit" value="完成">
						</td>
					</tr>
				</table>
			</div>
			
		</form>
	</body>
</html>